using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class PCIAfterOppRecordMap : EntityTypeConfiguration<PCIAfterOppRecord>
    {
        public PCIAfterOppRecordMap()
        {
            // Primary Key
            this.HasKey(t => t.PCIAfterOppRecordsId);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(20);

            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.update_by)
                .HasMaxLength(20);

            this.Property(t => t.Lab_Biochemical_BG)
                .HasMaxLength(50);

            this.Property(t => t.Cr)
                .HasMaxLength(50);

            this.Property(t => t.HospitalizationExtend)
                .HasMaxLength(10);

            this.Property(t => t.AnginaDisappeared)
                .HasMaxLength(10);

            this.Property(t => t.PerioperativeIABP)
                .HasMaxLength(10);

            this.Property(t => t.PerioperativeIABPTime)
                .HasMaxLength(10);

            this.Property(t => t.MACE)
                .HasMaxLength(10);

            this.Property(t => t.MyocardialInfarctionDay)
                .HasMaxLength(10);

            this.Property(t => t.EmergencyRevascularizationDay)
                .HasMaxLength(10);

            this.Property(t => t.CABGDay)
                .HasMaxLength(10);

            this.Property(t => t.AgainPCIDay)
                .HasMaxLength(10);

            this.Property(t => t.DeathDay)
                .HasMaxLength(10);

            this.Property(t => t.StentsSubacuteThrombosis)
                .HasMaxLength(50);

            this.Property(t => t.MechanicalComplications)
                .HasMaxLength(10);

            this.Property(t => t.MechanicalComplicationsDetail)
                .HasMaxLength(100);

            this.Property(t => t.MechanicalComplicationsDay)
                .HasMaxLength(10);

            this.Property(t => t.MechanicalComplicationsHour)
                .HasMaxLength(10);

            this.Property(t => t.BleedingComplications)
                .HasMaxLength(10);

            this.Property(t => t.BleedingComplicationsPosition)
                .HasMaxLength(100);

            this.Property(t => t.Thrombocytopenia)
                .HasMaxLength(10);

            this.Property(t => t.PunctureSiteComplicationsDetail)
                .HasMaxLength(100);

            this.Property(t => t.CerebrovascularAccident)
                .HasMaxLength(10);

            this.Property(t => t.RenalInsufficiency)
                .HasMaxLength(10);

            this.Property(t => t.AcuteLeftVentricularFailure)
                .HasMaxLength(10);

            this.Property(t => t.CardiogenicShock)
                .HasMaxLength(10);

            this.Property(t => t.PulmonaryEmbolism)
                .HasMaxLength(10);

            this.Property(t => t.isOther)
                .HasMaxLength(10);

            this.Property(t => t.OtherDetails)
                .HasMaxLength(200);

            this.Property(t => t.AgainCoronaryAngiography)
                .HasMaxLength(10);

            this.Property(t => t.EmergencyRevascularization)
                .HasMaxLength(10);

            this.Property(t => t.MyocardialInfarction)
                .HasMaxLength(10);

            this.Property(t => t.RecurrentAngina)
                .HasMaxLength(10);

            this.Property(t => t.cardiovascularToHospital)
                .HasMaxLength(10);

            this.Property(t => t.isShow)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("PCIAfterOppRecords");
            this.Property(t => t.PCIAfterOppRecordsId).HasColumnName("PCIAfterOppRecordsId");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.follow_up_id).HasColumnName("follow_up_id");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.update_by).HasColumnName("update_by");
            this.Property(t => t.Lab_Biochemical_BG).HasColumnName("Lab_Biochemical_BG");
            this.Property(t => t.Cr).HasColumnName("Cr");
            this.Property(t => t.HospitalizationExtend).HasColumnName("HospitalizationExtend");
            this.Property(t => t.AnginaDisappeared).HasColumnName("AnginaDisappeared");
            this.Property(t => t.PerioperativeIABP).HasColumnName("PerioperativeIABP");
            this.Property(t => t.PerioperativeIABPTime).HasColumnName("PerioperativeIABPTime");
            this.Property(t => t.MACE).HasColumnName("MACE");
            this.Property(t => t.MyocardialInfarctionDay).HasColumnName("MyocardialInfarctionDay");
            this.Property(t => t.EmergencyRevascularizationDay).HasColumnName("EmergencyRevascularizationDay");
            this.Property(t => t.CABGDay).HasColumnName("CABGDay");
            this.Property(t => t.AgainPCIDay).HasColumnName("AgainPCIDay");
            this.Property(t => t.DeathDay).HasColumnName("DeathDay");
            this.Property(t => t.StentsSubacuteThrombosis).HasColumnName("StentsSubacuteThrombosis");
            this.Property(t => t.MechanicalComplications).HasColumnName("MechanicalComplications");
            this.Property(t => t.MechanicalComplicationsDetail).HasColumnName("MechanicalComplicationsDetail");
            this.Property(t => t.MechanicalComplicationsDay).HasColumnName("MechanicalComplicationsDay");
            this.Property(t => t.MechanicalComplicationsHour).HasColumnName("MechanicalComplicationsHour");
            this.Property(t => t.BleedingComplications).HasColumnName("BleedingComplications");
            this.Property(t => t.BleedingComplicationsPosition).HasColumnName("BleedingComplicationsPosition");
            this.Property(t => t.Thrombocytopenia).HasColumnName("Thrombocytopenia");
            this.Property(t => t.PunctureSiteComplicationsDetail).HasColumnName("PunctureSiteComplicationsDetail");
            this.Property(t => t.CerebrovascularAccident).HasColumnName("CerebrovascularAccident");
            this.Property(t => t.RenalInsufficiency).HasColumnName("RenalInsufficiency");
            this.Property(t => t.AcuteLeftVentricularFailure).HasColumnName("AcuteLeftVentricularFailure");
            this.Property(t => t.CardiogenicShock).HasColumnName("CardiogenicShock");
            this.Property(t => t.PulmonaryEmbolism).HasColumnName("PulmonaryEmbolism");
            this.Property(t => t.isOther).HasColumnName("isOther");
            this.Property(t => t.OtherDetails).HasColumnName("OtherDetails");
            this.Property(t => t.AgainCoronaryAngiography).HasColumnName("AgainCoronaryAngiography");
            this.Property(t => t.EmergencyRevascularization).HasColumnName("EmergencyRevascularization");
            this.Property(t => t.MyocardialInfarction).HasColumnName("MyocardialInfarction");
            this.Property(t => t.RecurrentAngina).HasColumnName("RecurrentAngina");
            this.Property(t => t.cardiovascularToHospital).HasColumnName("cardiovascularToHospital");
            this.Property(t => t.isShow).HasColumnName("isShow");
        }
    }
}
